<?php
/**
 * @param string $message
 *
 */
$TEXT = $this->translate('Upload Complete');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?= $TEXT ?></title>
    <script type="text/javascript">
    function success()
    {
        window.top.Yz.Alert( "<?= $TEXT ?>" );
        this.sourceInput.value = "<?= $var_upload->id ?>";
        this.sourceDiv.appendChild(document.getElementById('yz-filedata'));

    }
    function onPageLoad()
    {
        <? /*
        var filedata = {
            'uploadId': "<?= $item->id ?>",
            'filelink': "<?= $this->webRoot . $item->getLinkToFile() ?>",
            'filename': "<?= $item->filename ?>",
            'filesize': "<?= $item->filesize ?>",
            'message': "<?= $TEXT ?>"
        };
        */ ?>
        try {
            window.top.Yz.Upload.uploadComplete(success);
        } catch (ex) {
            alert(ex);
        }
    }
    </script>
  </head>
  <body onload="onPageLoad()">
    <h1><?= $TEXT ?></h1>
    <div id="yz-filedata">
      <?= $var_upload->buildHTML($this) ?>
    </div>
  </body>
</html>

